<?php
/**
 * 蜻蜓数据导出CSV
 * @author yaoli<yaoli@pateo.com.cn>
 * @version 1.0 GetUser add by yaoli<yaoli@pateo.com.cn> 
 */
class mjson extends ActionBase {
	
	private $date = null;
	
	function init() {
	
	}
	
	/**
	 * 动作
	 *
	 * @see AActionBase::action()
	 */
	public function action() {
		
	}
	
	public function index(){
		
		$array = array('MonitorInfo'=>array(
				'success'=>100,'failed'=>1,'avgResponseTime'=>'2s',
				'detailList'=>array(
						array("serviceType"=>"1", "messageType"=>"1", "successNum "=>"100"," failedNm "=>"50","note"=>""),
						array("serviceType" =>"1", "messageType"=>"1", "successNum "=>"100"," failedNm "=>"50","note"=>"")
						)
				));
		echo json_encode($array);
	}
	
	public function logincrm(){
		$array = array(
				'userinfo'=>array('uid'=>101,'name'=>'韩寒','sex'=>1,'phone'=>13980040488,'ticket'=>'ba900b2dd774cc46b326068fdc8970b1da459787'),
				'vhlinfo'=>array(
						array("vid" =>"1", "platenum"=>"京P NB2089","vin"=>"LSJA16E31AG021387", "enginenum"=>"AAAk05340","vhl_color"=>"银白"),
						array("vid" =>"2", "platenum"=>"京P NB1089","vin"=>"LSJA26E31AG021387", "enginenum"=>"AAAk15340","vhl_color"=>"天使黄"),
						array("vid" =>"3", "platenum"=>"京P NB2089","vin"=>"LSJA36E31AG021387", "enginenum"=>"AAAk25340","vhl_color"=>"魔鬼白")
				)
			);
		echo json_encode($array);
	}
	
	public function showsuc(){
		$array = array('code'=>1,'description'=>'响应描述');
		echo json_encode($array);
	}
	
	public function returnnewestVHLhealthnumber(){
		$array = array('type'=>'newestvhlhealthnumber','number'=>'5');
		echo json_encode($array);
	}
	
	public function getaccountinfo(){
		$array = array('name'=>'韩寒','company'=>'上海博泰悦臻网络服务技术有限公司','company_address'=>'北京市朝阳区西坝河南路1号金泰大厦','company_phone'=>'01064402178',
				"cardType"=>"身份证", "card"=>"110105198101015438", "sex"=>"1","email"=>"13913683928@139.com","birthday"=>"1981-01-01",
				"fax" =>"01064402178", "mobilephone"=>"13913683928", "postcode"=>"100000","family_address"=>"北京市和平里西街243楼7六308室","family_phone"=>"01046698898");
		echo json_encode($array);
	}
	
	public function getcontact(){
		$array = array(array('contactid'=>1,'name'=>'韩寒','phone'=>'13913000000','relation'=>'亲属'),array('contactid'=>2,'name'=>'韩寒','phone'=>'13913000000','relation'=>'亲属'));
		$array = array('name'=>'韩寒','phone'=>'13913000000','relation'=>'亲属');
		echo json_encode($array);
	}
	
	public function getvhlinfo(){
		$array = array("vid" =>"1", "platenum"=>"京P NB2089","shift_type"=>"6档","enginenum"=>"AAAk05340","logo"=>"标致","platenum"=>"京P NB2089",
				"interior_color"=>"黑色","vhl_brand"=>"东风标致","seat_material"=>"真皮","vhl_series"=>"2012款标致508","hybrid"=>"1","emissions"=>"2.0L 108KW",
				"skylight"=>"1","air_way"=>"自然吸气","vhl_level"=>"中型车");
		echo json_encode($array);
	}
	
	public function getcontract(){
		$array = array("contractid" =>"000-3579-431", "begin_time"=>"2010-01-01","end_time"=>"2011-01-01","contract_plan"=>"基本通信套餐包",
				array(array('name'=>'E-Call','count'=>'不限次','description'=>'紧急救援电话服务'),
						array('name'=>'B-Call','count'=>'不限次','description'=>'道路救援电话服务'),
						array('name'=>'I-Call','count'=>'30次/月','description'=>'一键导航电话服务'),
						array('name'=>'保养提醒','count'=>'不限次','description'=>'按您的车况制定保养计划且提醒您预约保养。'),
						array('name'=>'车况报告','count'=>'1次/月','description'=>'系统会根据您的车辆数据，每月为您统计一份车况分析报告'),
						array('name'=>'软件升级','count'=>'不限次','description'=>'系统软件更新，可通过网站下载后，对车机系统进行升级。'),));
		echo json_encode($array);
	}
	
	
	public function getinsurance(){
		$array = array("insurance_company" =>"中国平安保险（集团）股份有限公司","insurance_id"=>'CX1000098', "begin_time"=>"2010-01-01","end_time"=>"2011-01-01","insurance_phone"=>"40088-95512");
		echo json_encode($array);
	}
	
	public function modifypin(){
		$array = array("vin"=>"LSJA16E31AG021387","uid"=>"12","old_pin" =>"123456","new_pin"=>"654321");
		echo json_encode($array);
	}
	
	public function getvhlcondition(){
		$array = array("state information"=>array(array("type"=>"1","level"=>"0"),array("type"=>"2","level"=>"0"),array("type"=>"3","level"=>"0"),array("type"=>"4","level"=>"0"),array("type"=>"5","level"=>"0")),
				"maintainance information"=>array(array("machine oil"=>"85","mileage"=>"8423")));
		echo json_encode($array);
	}
	
	public function gethistoryvhlcondition(){
		$array = array(array("hid"=>1,"title"=>"2010年01月车况报告","time"=>"2010-02-01"),array("hid"=>2,"title"=>"2010年02月车况报告","time"=>"2010-02-02"),
				array("hid"=>3,"title"=>"2010年03月车况报告","time"=>"2010-02-03"),array("hid"=>4,"title"=>"2010年04月车况报告","time"=>"2010-02-04"));
		echo json_encode($array);
	}
	
	public function getecodriving(){
		$array = array("total_distance"=>1,"oil_wear"=>"11.5","last_month_oil_wear"=>"12.1");
		echo json_encode($array);
	}
	
	public function maintanceremind(){
		$array =  array("time"=>"2011年01月01日","total_distance"=>"6000","explain"=>"建议您到4S店更换机油和机滤");
		echo json_encode($array);
	}
	
	public function getservices(){
		$array = array(array("sid"=>1,"title"=>"车况报告服务","on_off"=>1,"explain"=>"勾选开启为开启车况服务，取消为关闭车况报告服务。"),array("sid"=>2,"title"=>"环保驾驶服务","on_off"=>1,"explain"=>"勾选开启为环保驾驶服务，取消为关闭环保驾驶服务。"),
				array("sid"=>3,"title"=>"保养提醒服务","on_off"=>1,"explain"=>"勾选开启为保养提示服务，取消为关闭保养提示服务。"));
		echo json_encode($array);
	}
	
	public function modifyservices(){
		$array = array("uid"=>12,"vin"=>"LSJA16E31AG021387",array("sid"=>1,"on_off"=>1),array("sid"=>1,"on_off"=>1),array("sid"=>1,"on_off"=>1));
		echo json_encode($array);
	}
	
	public function gettelecominfo(){
		$array = array("package_usage"=>array("talktime"=>"当期套餐内通话时长，已使用30分钟；剩余70分钟。","3Gtraffic"=>"当期套餐内3G流量，已使用200M；剩余400M。","message"=>"当期套餐内短信数量，已使用300条；剩余600条。"),
				"package_explain"=>array("talktime"=>"100分钟/月","3Gtraffic"=>"600M/月","message"=>"900条/月","mark"=>"  超过套餐使用费用，流量：0.3元/兆（M）通话：0.24元/分钟 短信：0.1元/条。"));
		echo json_encode($array);
		
	}
	
	public function complaint(){
		$array = array("province"=>"北京","city"=>"province", "platenum"=>"京P NB2089","vin"=>"LSJA16E31AG021387", "uid"=>"123","mobile_phone"=>"13913683928"
				,"total_distance"=>"6000","complaint_title"=>"竟然敢挂我电话!","complaint_content"=>"我投诉分机号134的接线员，一言不和挂我电话!!");
		echo json_encode($array);
	
	}
	
	public function softwareupgrade(){
		$array = array("publish_time"=>"2010年01月01日 18：30：21","version"=>"1.3.180.20100101.RC3 ", "upgrade explain"=>
				array(array("title"=>"新增","description"=>"重新设计浏览器窗口管理界面，全新夜间模式，增加快速切换窗口的功能"),
						array("title"=>"新增","description"=>"全新的音乐体验"),
						array("title"=>"新增","description"=>"更便捷的应用商店云推送机制"),
						array("title"=>"修复","description"=>"日历同步失败的问题"),
						array("title"=>"修复","description"=>"某些情况下，卸载应用引起重启的问题。")));
		echo json_encode($array);
	}
	
	public function citylist(){
		$array = array("北京","上海","南京","深圳","苏州","郑州","天津","沈阳","重庆");
		echo json_encode($array);
	}
	
	public function get4sbycity(){
		$array = array("target_city"=>"漳州", "4s_list"=>
				array(array("title"=>"北京博瑞祥宇汽车销售服务有限公司","address"=>"北京市朝阳区德胜门外花虎沟2号","phone"=>"010-82818880"),
						array("title"=>"北京博瑞祥宇汽车销售服务有限公司","address"=>"北京市朝阳区德胜门外花虎沟2号","phone"=>"010-82818880"),
						array("title"=>"北京博瑞祥宇汽车销售服务有限公司","address"=>"北京市朝阳区德胜门外花虎沟2号","phone"=>"010-82818880")));
		echo json_encode($array);
	}
	
	

}